﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Xyz.Web.Reservation.Models.PassengerListModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Passenger Details
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
      <h2>Passenger Details</h2>

     <span style="font-size: 11px; margin-left: 18px;">All passengers must carry a valid passport and visa for travel. Xyz Airlines is not responsible for validating the document.</span>
     <br />
     <span style="font-size: 11px; margin-left: 18px;">All items marked with an asterisk (*) are required.</span>
     <br />

     <% Html.EnableClientValidation(); %>

     <% using (Html.BeginForm())
       { %>

        <% 
            for (int i = 0; i < Model.Passengers.Count; i++) %>
        <% { %>

          <fieldset>
           <legend>Passenger #<%= (i + 1).ToString() %></legend>
            <table width="100%">
                <tr>
                    <td style="width:27%">
                        <%: Html.LabelFor(model => model.Passengers[i].TitleCode) %>
                    </td>
                    <td style="width:73%">
                      <%= Html.DropDownListFor(model => model.Passengers[i].TitleCode,(SelectList)ViewData["Titles"])%> 
                    </td>
                </tr>
                <tr>
                    <td >
                        <%: Html.LabelFor(model => model.Passengers[i].FirstName) %>
                    </td>
                    <td >
                        <%: Html.TextBoxFor(model => model.Passengers[i].FirstName) %>
                        <%: Html.ValidationMessageFor(model => model.Passengers[i].FirstName) %>
                    </td>
                </tr>
                <tr>
                    <td>
                        <%: Html.LabelFor(model => model.Passengers[i].LastName) %>
                    </td>
                    <td>
                       <%: Html.TextBoxFor(model => model.Passengers[i].LastName) %>
                       <%: Html.ValidationMessageFor(model => model.Passengers[i].LastName) %>
                    </td>
                </tr>
                <tr>
                    <td>
                        <%: Html.LabelFor(model => model.Passengers[i].DateOfBirth)%>
                    </td>
                    <td>
                        <%: Html.EditorFor(model => model.Passengers[i].DateOfBirth)%>
                        <%: Html.ValidationMessageFor(model => model.Passengers[i].DateOfBirth)%>
                    </td>
                </tr>
                <tr>
                    <td>
                        <%: Html.LabelFor(model => model.Passengers[i].PassportNo)%>
                    </td>
                    <td>
                        <%: Html.TextBoxFor(model => model.Passengers[i].PassportNo)%>
                        <%: Html.ValidationMessageFor(model => model.Passengers[i].PassportNo)%>
                    </td>
                </tr>
                <tr>
                    <td>
                        <%: Html.LabelFor(model => model.Passengers[i].PassportExpiryDate)%>
                    </td>
                    <td>
                        <%: Html.EditorFor(model => model.Passengers[i].PassportExpiryDate) %>
                        <%: Html.ValidationMessageFor(model => model.Passengers[i].PassportExpiryDate)%>
                    </td>
                </tr>
                <tr>
                    <td>
                        <%: Html.LabelFor(model => model.Passengers[i].EmailAddress)%>
                    </td>
                    <td>
                        <%: Html.TextBoxFor(model => model.Passengers[i].EmailAddress)%>
                        <%: Html.ValidationMessageFor(model => model.Passengers[i].EmailAddress)%>
                    </td>
                </tr>
                 <tr>
                    <td>
                        <%: Html.LabelFor(model => model.Passengers[i].ContactNo)%>
                    </td>
                    <td>
                        <%: Html.TextBoxFor(model => model.Passengers[i].ContactNo)%>
                        <%: Html.ValidationMessageFor(model => model.Passengers[i].ContactNo)%>
                    </td>
                </tr>
            </table>


        </fieldset>
        <% 
            }  %>
   
     <input type="submit" value="   Next   " class="yellow_button" />
     <br />
     <br />
     <% } %>
</asp:Content>

